﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Admin3000.Backend.Api.Migrations
{
    public partial class 为用户表增加两个字段昵称和头像 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "Avatar",
                table: "Users",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Nickname",
                table: "Users",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.UpdateData(
                table: "Users",
                keyColumn: "Id",
                keyValue: 1,
                columns: new[] { "CreatedTime", "UpdatedTime" },
                values: new object[] { new DateTime(2021, 7, 29, 10, 32, 6, 159, DateTimeKind.Local).AddTicks(1413), new DateTime(2021, 7, 29, 10, 32, 6, 160, DateTimeKind.Local).AddTicks(3063) });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Avatar",
                table: "Users");

            migrationBuilder.DropColumn(
                name: "Nickname",
                table: "Users");

            migrationBuilder.UpdateData(
                table: "Users",
                keyColumn: "Id",
                keyValue: 1,
                columns: new[] { "CreatedTime", "UpdatedTime" },
                values: new object[] { new DateTime(2021, 7, 25, 22, 29, 45, 811, DateTimeKind.Local).AddTicks(5627), new DateTime(2021, 7, 25, 22, 29, 45, 812, DateTimeKind.Local).AddTicks(6630) });
        }
    }
}
